home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 03 - 1987 / 03.04 Apr 87 / MPW macros / doWIND < prev    next >
Encoding:
Text File  |  1987-01-26  |  1.1 KB  |  61 lines  |  [TEXT/MPS ]

  1. set exit 0        #so 'cancel' buttons not fatal
  2.  
  3. "{MPW}macros:getResAttrs" WIND
  4.  
  5. set br "`request 'BoundsRect? (t,l,b,r)'`"
  6. set ty `request -d d 'Box: <D>oc|<B>ox|<P>lain|<A>lt|<N>ogro|<Z>oom|<R>nd'`
  7. confirm 'Visible?'
  8. if {status} == 0
  9.     set vis "visible"
  10. else
  11.     set vis "invisible"
  12. end
  13. confirm 'GoAway?'
  14. if {status} == 0
  15.     set go "goAway"
  16. else
  17.     set go "noGoAway"
  18. end
  19. set ref `request -d 0 'Reference Constant?'`
  20. set tex "`request -d Untitled 'Title?'`"
  21.  
  22. #determine window type
  23. if {ty} =~ /[Dd]≈/
  24.     set wtyp "documentProc"
  25. else
  26.     if {ty} =~ /[Bb]≈/
  27.         set wtyp "dBoxProc"
  28.     else
  29.         if {ty} =~ /[Pp]≈/
  30.             set wtyp "plainDBox"
  31.         else
  32.             if {ty} =~ /[Aa]≈/
  33.                 set wtyp "altDBoxProc"
  34.             else
  35.                 if {ty} =~ /[Nn]≈/
  36.                     set wtyp "noGrowDocProc"
  37.                 else
  38.                     if {ty} =~ /[Zz]≈/
  39.                         set wtyp "zoomDocProc"
  40.                     else
  41.                         if {ty} =~ /[Rr]≈/
  42.                             set wtyp "rDocProc"
  43.                         else
  44.                             set wtyp "unKnown"
  45.                         end
  46.                     end
  47.                 end
  48.             end
  49.         end
  50.     end
  51. end
  52.  
  53. #fill out rez entry
  54. echo "  ∂{{br}∂},"
  55. echo "  {wtyp},"
  56. echo "  {vis},"
  57. echo "  {go},"
  58. echo "  {ref},∂t∂/* refcon *∂/"
  59. echo "  ∂"{tex}∂""
  60. echo "∂};"
  61.